﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Serialization;

namespace Weixin.MP.Map.Models
{
    [XmlRoot("weixin")]
    public class Weixin
    {
        [XmlAttribute("menu")]
        public string Menu { get; set; }
        [XmlElement("title")]
        public string Title { get; set; }
        [XmlElement("image")]
        public string Image { get; set; }
        [XmlArray("content")]
        [XmlArrayItem("station")]
        public Station[] Content { get; set; }
        [XmlElement("rnewtime")]
        public string Rnewtime { get; set; }

    }

    [XmlRoot("station")]
    public class Station
    {
        [XmlAttribute("high")]
        public string High { get; set; }
        [XmlAttribute("lat")]
        public string Lat { get; set; }
        [XmlAttribute("lon")]
        public string Lon { get; set; }
        [XmlAttribute("name")]
        public string Name { get; set; }
        [XmlAttribute("id")]
        public string Id { get; set; }
        [XmlElement("change")]
        public Change Change { get; set; }
    }

    [XmlRoot("change")]
    public class Change
    {
        /// <summary>
        /// 雨量
        /// </summary>
        [XmlAttribute("rain")]
        public string Rain { get; set; }
        /// <summary>
        /// 风
        /// </summary>
        [XmlAttribute("ff")]
        public string Ff { get; set; }
        /// <summary>
        /// 风向
        /// </summary>
        [XmlAttribute("fd")]
        public string Fd { get; set; }
        /// <summary>
        /// 温度
        /// </summary>
        [XmlAttribute("temp")]
        public string Temp { get; set; }
        /// <summary>
        /// 能见度
        /// </summary>
        [XmlAttribute("visibility")]
        public string Visibility { get; set; }
        /// <summary>
        /// 最高温
        /// </summary>
        [XmlAttribute("tmax")]
        public string Tmax { get; set; }
        /// <summary>
        /// 最低温
        /// </summary>
        [XmlAttribute("tmin")]
        public string Tmin { get; set; }
        /// <summary>
        /// 雷电强度
        /// </summary>
        [XmlAttribute("intensity")]
        public string Intensity { get; set; }
    }
}